 {include file="header.html"}
 


<div class="mrightTop">
  <div class="fontl">
    <form method="get">
       <div class="left">
          <input type="hidden" name="app" value="ad" />
          <input type="hidden" name="act" value="sel_type" />  
          <input type="hidden" name="id" value="{$id}" />  
              <input type="hidden" name="type" value="{$type}" />           
          名称: <input class="queryInput" type="text" name="name" value="{$smarty.get.name|escape}" />
          <input type="submit" class="formbtn" value="{$lang.query}" />
          
          
           <!--{if $filtered}-->
      <a class="left formbtn1" href="index.php?app=ad&act=sel_type&id={$id}&type={$type}" style="float:right">{$lang.cancel_query}</a>
      <!--{/if}-->
      </div>
    </form>
  </div>
  </div>
<div class="tdare">
	<table width="100%" cellspacing="0" class="dataTable">
	{if $type=='store'}
		<!--{if $list}-->
		<tr class="tatr1">			 
			<td>店铺</td>
			<td>店主</td>
			<td>地址</td>
		    <td class="table-center">{$lang.handler}</td>
	      </tr>		 
		<!--{/if}-->
		<!--{foreach from=$list item=v}-->
		<tr class="tatr2">		 
			<td align="center">{$v.store_name}</td>
			<td align="center">{$v.owner_name}</td>
			<td align="center">{$v.address}</td>
			  <td class="table-center"><a onClick="return as({$v.store_id},'{$v.store_name}')" href="javascript:">选择</a></td>
		</tr>
		<!--{foreachelse}-->
		<tr class="no_data">
			<td colspan="10">{$lang.no_data}</td>
		</tr>
		<!--{/foreach}-->
	{elseif $type=='goods'}
			<!--{if $list}-->
		<tr class="tatr1">			 
			<td>商品名称</td>
			<td>分类</td>
			<td>品牌</td>
		    <td class="table-center">{$lang.handler}</td>
	      </tr>		 
		<!--{/if}-->
		<!--{foreach from=$list item=v}-->
		<tr class="tatr2">		 
			<td align="center">{$v.goods_name}</td>
			<td align="center">{$v.cate_name}</td>
			<td align="center">{$v.brand}</td>
			  <td class="table-center"><a  onClick="return as({$v.goods_id},'{$v.goods_name}')" href="javascript:">选择</a></td>
		</tr>
		<!--{foreachelse}-->
		<tr class="no_data">
			<td colspan="10">{$lang.no_data}</td>
		</tr>
		<!--{/foreach}-->
	
	  {elseif $type=='article'}
			<!--{if $list}-->
		<tr class="tatr1">
			<td>标题</td>			
			<td>添加时间</td>
		    <td class="table-center">{$lang.handler}</td>
	      </tr>		 
		<!--{/if}-->
		<!--{foreach from=$list item=v}-->
		<tr class="tatr2">		 
			<td align="center">{$v.title}</td>	 
			<td align="center">{$v.add_time}</td>
			  <td class="table-center"><a  onClick="return as({$v.article_id},'{$v.title}')" href="javascript:" >选择</a></td>
		</tr>
		<!--{foreachelse}-->
		<tr class="no_data">
			<td colspan="10">{$lang.no_data}</td>
		</tr>
		<!--{/foreach}-->
	{/if}	
		
	</table>
</div>

<script type="text/javascript" language="JavaScript">
function  as(outkey,tname)
{
var doc = parent.document;
doc.getElementById("outkey").value=outkey;
doc.getElementById("tname").value=tname;
parent.$("#taglist").colorbox.close();
}
</script>
